#include<cstdio>
#include<iostream>
#include<vector>
using namespace std;//一定不能忘了跳出条件
const int N  = 100010;
int ret[N] = {0};
void mer_sort(vector<int> &arr,int l,int r)
{
    if(l >= r)
        return;
    int mid = l + r >> 1;
    mer_sort(arr,l,mid);
    mer_sort(arr,mid + 1,r);
    int k = 0;
    int i = l;
    int j = mid + 1;
    while(i <= mid &&j <= r)
    {
        if(arr[i] > arr[j])
        {
            ret[k++] = arr[j++];
        }
        else
        {
            ret[k++] = arr[i++];
        }
    } 
    while(i <= mid)
    {
        ret[k++] = arr[i++];
    }
    while(j <= r)
    {
        ret[k++] = arr[j++];
    }
    for(i = l,j = 0;i <= r;i++,j++)
    {
        arr[i] = ret[j]; 
    }
}
int main()
{
    vector<int>arr;
    int n = 0;
    cin >> n;
    int tem = 0;
    for(int i = 0;i < n;i ++)
    {
        scanf("%d",&tem);
        arr.push_back(tem);
    }
    mer_sort(arr,0, n - 1);
    for(auto j :arr)
    {
        cout << j << ' ';
    }
    return 0;
}
